<template>
  <div class="f-c">
    <div class="header">
      <div class="title">建设单位</div>
    </div>
    <el-form>
      <el-form-item style="text-align: right">
        <el-button type="primary" :disabled="!selectOptions.length" @click="onBatchSend(scope.row)">批量下发账号</el-button>
      </el-form-item>
    </el-form>
    <div class="table-box">
      <el-table
        v-loading="loading"
        height="100%"
        :data="tableData"
        element-loading-spinner="el-icon-loading"
        element-loading-background="rgba(255, 255, 255, 0.8)"
        @selection-change="onSelect"
      >
        <el-table-column v-for="item in columns" :key="item.prop" :prop="item.prop" :label="item.label" align="center" />
        <el-table-column label="操作" fixed="right" width="100px">
          <template slot-scope="scope">
            <CommonStatusTag :status="scope.row.SignInStatus" :status-list="receiveStatusList" />
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import { http } from '@/api'
import crud from '@/mixins/crud'
import { MeetingUserStatus } from '@/dict'
export default {
  name: 'BuildInfo',
  mixins: [crud],
  props: {
    currentDetail: Object
  },
  data() {
    return {
      request: {
        list: http.admin_engineering.build_info
      },
      receiveStatusList: MeetingUserStatus,
      columns: [
        { prop: 'departName', label: '建设单位名称' },
        { prop: 'industryName', label: '行业' },
        { prop: 'directorName', label: '负责人' },
        { prop: 'directorPhone', label: '企业联系人电话' },
        { prop: 'username', label: '号码' },
        { prop: 'expertName', label: '真实姓名' },
        { prop: 'participation', label: '参与情况' }
      ]
    }
  },
  methods: {
    getQueryParams() {
      const params = {
        projectId: this.currentDetail.id
      }
      return params
    },
    onBatchSend() {
      http.meeting_process.sendAccountProfessor(this.selectOptions1.map(el => el.id)).then(res => {
        this.$message.success(res.msg)
        this.getList1()
      })
    }
  }
}
</script>

<style scoped lang="scss">
</style>
